<div class="content-wrap">

        <div class="hotnews">
            <p class="controller">
                <a href="#rewind" class="rewind">Trước</a>
                <a href="#forward" class="forward">Sau</a>
            </p>
            <label>Tin mới</label>
            <ul >
            </ul>

        </div>

<section id="content" class="article_layout">
        <header>
            <!-- Article status = Live -->

            <p class="cate" itemprop="articleSection"><?=$sub_cate_name?></p>
            <!-- Last update time of the article -->
            <time datetime="<?=date('Y-m-d H:i:s', $topicInfo->topic_news_date)?>"></time>
            <!-- Title -->
            <h1 itemprop="name">
            <?=$topicInfo->topic_news_title?>
            </h1>
            <!-- Summary -->
            <div class="summary">
            <p itemprop="description"><?=$topicInfo->topic_news_desc?></p>
            </div>

        </header>
        <article>
            <!-- Main content -->
            <div class="content" itemprop="articleBody">
                <?=$topicInfo->topic_news_content?>
            </div>
            <p class="lastupdate">Bài viết được cập nhật lần cuối lúc <?=date('H:i:s d-m-Y', $topicInfo->topic_news_date)?></p>
            <div id="credit">
                <p class="author" itemprop="author" itemscope="" itemtype="http://schema.org/Person">
                    <?=$topicInfo->topic_news_author?>
                </p>
                <p class="credit">

                </p>

                <p class="source">
                </p>
            </div>
        </article>
        <!-- <section style="display: block;" class="next_read">
                <header>
                <h1>Đọc tiếp</h1>
                </header>
                <?php
                    if ($readMore5topic):
                        foreach ($readMore5topic as $topic) {
                ?>
                <article>
                    <header>
                    <time datetime="<?=date('Y-m-d H:i:s', $topicInfo->topic_news_date)?>"></time>
                    <h1>
                    <a href="<?=site_url('home/detail').'/'.$topic->topic_news_id?>">
                    <?php echo $topic->topic_news_title;?>
                    </a>
                    <span class="social <?php echo $topic->top;?>" style="display: inline;"><?php echo $topic->top;?></span>
                    </h1>
                    </header>
                </article>
                <?php } endif;?>
        </section> -->
        <aside class="sidebar">

            <section class="related">
                    <header>
                    <h1>Liên quan</h1>
                    </header>
                    <?php 
                        if($topicTag):
                            foreach ($topicTag as $topic) {
                    
                        ?>
                        <article>
                            <header>
                            <h1>
                            <a href="<?=site_url('home/detail').'/'.$topic->topic_news_id?>">
                            <?=$topic->topic_news_title?>
                            </a>

                            </h1>
                            </header>
                        </article>
                    <?php } endif;?>
                    
            </section>
            <div class="floating" style="position: relative; float: left;">
                <section class="topview">
                    <header>
                    <h1>Đọc nhiều</h1>
                    </header>
                    <?php
                            if ($topicReadless):
                                foreach ($topicReadless as $key=>$topic) {
                    ?>
                    <article>
                        <div class="cover" style="background-image: url(<?=base_url().$topic->topic_news_picture;?>)">
                        <a href="<?=site_url('home/detail').'/'.$topic->topic_news_id?>"></a>
                        </div>
                        <header>
                        <h1>
                        <a href="<?=site_url('home/detail').'/'.$topic->topic_news_id?>">
                       <?php echo $topic->topic_news_title;?>
                        </a>

                        </h1>
                        </header>
                    </article>
                    <?php } endif;?>
                </section>
            </div>
        </aside>
</section>

<section id="comments">
        <header>
        <h1>Chia sẻ</h1>
        <ul>
        <li class="zini current">Zini</li>
        <li class="facebook">Facebook
        (<span class="count"><fb:comments-count class=" fb_comments_count_zero" fb-xfbml-state="rendered" href="http://news.zing.vn/zingnews-post392197.html"><span class="fb_comments_count">0</span></fb:comments-count></span>)
        </li>
        </ul>
        </header>

        <div style="display: block;" id="facebook">
            <div fb-xfbml-state="rendered" class="fb-comments fb_iframe_widget" data-href="197.html" data-colorscheme="light" data-numposts="10" data-width="660" data-notify="true" style="width:100%;">
                <span style="height: 160px; width: 660px;">
                    <iframe src="comments.html" class="fb_ltr" title="Facebook Social Plugin" style="border: medium none; overflow: hidden; height: 160px; width: 660px;" name="f1d07d695bd6ec2" id="f1aa8846f43ba46" scrolling="no"></iframe>
                </span>
            </div>
        </div>
</section>


<section id="discover">

        <section class="category same_cate">
                <header>
                    <hgroup>
                    <h1><a href="#">Bạn có thể quan tâm</a></h1>
                    </hgroup>
                </header>

                <?php
                        if ($topicTag):
                            foreach ($topicTag as $topic) {
                ?>
                <article class="">
                    <p class="type"></p>
                    <div class="cover" style="background-image: url(<?=base_url().$topic->topic_news_picture?>)">
                    <a href="<?=site_url('home/detail').'/'.$topic->topic_news_id?>"></a>
                    </div>
                    <header>
                    <h1>
                    <a href="<?=site_url('home/detail').'/'.$topic->topic_news_id?>">
                    <?=$topic->topic_news_title?>
                    </a>

                    </h1>
                    <time datetime="<?=date('H:i:s d-m-Y', $topic->topic_news_date)?>"></time>
                    <p class="cate">
                        <?php
                            $CI = & get_instance();
                            $CI->load->model('category_model','cate');
                            $category = $CI->cate->getInfo($topic->category_id);
                            if ($category) echo $category->category_name;
                        ?>
                    </p>
                    </header>
                </article>
                <?php } endif;?>
        </section>

        <?php 
            if($related_cate):
                foreach ($related_cate as $value) {
        ?>
        <section class="category related_cate">
            
            <header>
            <h1><a href="<?=base_url().$value->category_links?>" title="<?=$value->category_name?>"><?=$value->category_name?></a></h1>
            </header>
            <!-- Tin Nổi bật Chuyên mục -->
            <?php
                $CI = & get_instance();
                $CI->load->model('mindex');
                $Top5TopicByCate = $CI->mindex->get5TopicByCate($value->category_id);
                if ($Top5TopicByCate):
                    for ($i=0; $i < count($Top5TopicByCate) ; $i++){ 
                        if($i==0){
            ?>
            <article class="featured">
                <p class="type"></p>
                <div class="cover" style="background-image: url(<?=base_url().$Top5TopicByCate[$i]->topic_news_picture?>)">
                <a href="<?=site_url('home/detail').'/'.$Top5TopicByCate[$i]->topic_news_id?>"></a>
                </div>
                <header>
                <h1>
                <a href="<?=site_url('home/detail').'/'.$Top5TopicByCate[$i]->topic_news_id?>">
                <?=$Top5TopicByCate[$i]->topic_news_title?>
                </a>

                </h1>
                <time datetime="<?=date('H:i:s d-m-Y', $Top5TopicByCate[$i]->topic_news_date)?>"></time>
                <p class="summary"><?php echo substr(strip_tags($Top5TopicByCate[$i]->topic_news_content), 0,200).'...'; ?></p>
                </header>
            </article>
            <?php }else{ ?>

            <article>
                <div class="cover" style="background-image: url(<?=base_url().$Top5TopicByCate[$i]->topic_news_picture?>)">
                <a href="<?=site_url('home/detail').'/'.$Top5TopicByCate[$i]->topic_news_id?>"></a>
                </div>
                <header>
                <h1>
                <a href="<?=site_url('home/detail').'/'.$Top5TopicByCate[$i]->topic_news_id?>">
                <?=$Top5TopicByCate[$i]->topic_news_title?>
                </a>

                </h1>
                <time datetime="<?=date('H:i:s d-m-Y', $Top5TopicByCate[$i]->topic_news_date)?>"></time>
                <p class="cate"><?=$value->category_name?></p>
                </header>
            </article>
                    <?php } } endif;?>
           
        </section>
         <?php } endif;?>
</section>

</div>

<section class="sidebar">

        <div id="advR1" class="banner"><div style="height: 250px;" id="advR1_temp">
        <script>
        //     if ($(document).width() > 1000) {
        //     vng_ads.showBannerR1();
        //     }
        //     </script><!-- 123Click Ads Code begin -->
       <script type="text/javascript">
        //     (function(d, s, id) {
        //     var js, fjs = d.getElementsByTagName(s)[0];
        //     if (d.getElementById(id)) {return;}
        //     js = d.createElement(s);
        //     js.type = 'text/javascript';
        //     js.async=true;
        //     js.id = id;
        //     js.src = "http://static.adtimaserver.vn/resource/js/zads-base-mod.js";
        //     fjs.parentNode.insertBefore(js, fjs);}(document, 'script', 'z2-jssdk'));
        // </script>
        <div z2-rendered="true" z2-zoneid="2328465490092448928" z2-width="300" z2-height="250" class="z2-zads-zone"><div style="width: 300px; height: 250px;" z2-rendered="true" id="zadDiv_2328465490092448928" align="center"><iframe src="javascript:void(parent.ZADS.M2.loadIFrame(this, document, '2328465490092448928', 300, 250,''))" marginheight="0" marginwidth="0" style="height: 250px; width: 300px;" id="zadIFrame_Base_2328465490092448928" frameborder="0" scrolling="no"></iframe></div></div>
        </div></div>
        <div id="advR2" class="banner"><div style="height: 250px;" id="advR2_temp">
        <script>
                // if ($(document).width() > 1000) {
                // vng_ads.showBannerR2();
                // }
                // </script><!-- 123Click Ads Code begin -->
                 <script type="text/javascript">
                // (function(d, s, id) {
                // var js, fjs = d.getElementsByTagName(s)[0];
                // if (d.getElementById(id)) {return;}
                // js = d.createElement(s);
                // js.type = 'text/javascript';
                // js.async=true;
                // js.id = id;
                // js.src = "http://static.adtimaserver.vn/resource/js/zads-base-mod.js";
                // fjs.parentNode.insertBefore(js, fjs);}(document, 'script', 'z2-jssdk'));
        </script>
        <div z2-rendered="true" z2-zoneid="649683947998370983" z2-width="300" z2-height="250" class="z2-zads-zone"><div style="width: 300px; height: 250px;" z2-rendered="true" id="zadDiv_649683947998370983" align="center"><div id="zadInlineHTML_Base_649683947998370983" style="width: 300px; height: 250px;">    <div id="zadInlineHTML_649683947998370983" style="width: 300px; height: 250px;"><script async="" src="Chuy%E1%BB%87n%20kh%C3%B3%20tin%20v%E1%BB%81%20ng%C6%B0%E1%BB%9Di%20%C4%91%C3%A0n%20%C3%B4ng%20m%C3%B9%20bi%E1%BA%BFt%20%C4%91i%20xe%20%C4%91%E1%BA%A1p%20c%C3%B3%2010%20v%E1%BB%A3%20-%20%C4%90%E1%BB%9Di%20s%E1%BB%91ng%20-%20Zing%20News_files/adsbygoogle.js"></script>
        <!-- ZingNews_DoiSong_R2 -->
        <ins data-adsbygoogle-status="done" class="adsbygoogle" style="display:inline-block;width:300px;height:250px" data-ad-client="ca-pub-0538304250621736" data-ad-slot="3982343056"><ins style="display:inline-table;border:none;height:250px;margin:0;padding:0;position:relative;visibility:visible;width:300px;background-color:transparent"><ins id="aswift_1_anchor" style="display:block;border:none;height:250px;margin:0;padding:0;position:relative;visibility:visible;width:300px;background-color:transparent"><iframe marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" onload="var i=this.id,s=window.google_iframe_oncopy,H=s&amp;&amp;s.handlers,h=H&amp;&amp;H[i],w=this.contentWindow,d;try{d=w.document}catch(e){}if(h&amp;&amp;d&amp;&amp;(!d.body||!d.body.firstChild)){if(h.call){setTimeout(h,0)}else if(h.match){try{h=s.upd(h,i)}catch(e){}w.location.replace(h)}}" id="aswift_1" name="aswift_1" style="left:0;position:absolute;top:0;" frameborder="0" height="250" scrolling="no" width="300"></iframe></ins></ins></ins>
        <script>
        (adsbygoogle = window.adsbygoogle || []).push({});
        </script><img src="Chuy%E1%BB%87n%20kh%C3%B3%20tin%20v%E1%BB%81%20ng%C6%B0%E1%BB%9Di%20%C4%91%C3%A0n%20%C3%B4ng%20m%C3%B9%20bi%E1%BA%BFt%20%C4%91i%20xe%20%C4%91%E1%BA%A1p%20c%C3%B3%2010%20v%E1%BB%A3%20-%20%C4%90%E1%BB%9Di%20s%E1%BB%91ng%20-%20Zing%20News_files/hit.gif">    </div></div></div></div>
        </div></div>

        <!-- End 123.vn -->

        <!-- Zing TV -->

        <!-- End Zing TV -->


        <!-- Start Box Sidebar -->



        <section style="display: block;" id="promotedposts">
                <header>
                <h1><a href="http://news.zing.vn/thi-truong/TTDN.html" title="Thông tin doanh nghiệp">Thông tin doanh nghiệp </a></h1>
                </header>

                <article>
                <div class="cover" style="background-image: url(http://img.v3.news.zdn.vn/w480/Uploaded/JAC2_N3/2014_02_26/FPT_telecom.jpg)">
                <a href="http://news.zing.vn/FPT-Telecom-thuc-hien-Nam-trat-tu-va-van-minh-do-thi-2014-post394845.html#detail_sidebar.pr"></a>
                </div>
                <header>
                <h1>
                <a href="http://news.zing.vn/FPT-Telecom-thuc-hien-Nam-trat-tu-va-van-minh-do-thi-2014-post394845.html#detail_sidebar.pr">
                FPT Telecom thực hiện 'Năm trật tự và văn minh đô thị 2014'
                </a>

                </h1>
                </header>
                </article>

                <article>
                <div class="cover" style="background-image: url(http://img.v3.news.zdn.vn/w480/Uploaded/JAC1_N3/2014_02_25/Anh.jpg)">
                <a href="http://news.zing.vn/Tien-ich-cho-khach-hang-Agribank-khi-thanh-toan-truc-tuyen-post394652.html#detail_sidebar.pr"></a>
                </div>
                <header>
                <h1>
                <a href="http://news.zing.vn/Tien-ich-cho-khach-hang-Agribank-khi-thanh-toan-truc-tuyen-post394652.html#detail_sidebar.pr">
                Tiện ích cho khách hàng Agribank khi thanh toán trực tuyến 
                </a>

                </h1>
                </header>
                </article>

                <article style="display: block;">
                <div class="cover" style="background-image: url(http://img.v3.news.zdn.vn/w480/Uploaded/JAC1_N3/2014_02_24/IMG_3104.JPG)">
                <a href="http://news.zing.vn/Nhung-thoi-quen-xau-anh-huong-den-rang-mieng-o-tre-em-post394252.html#detail_sidebar.pr"></a>
                </div>
                <header>
                <h1>
                <a href="http://news.zing.vn/Nhung-thoi-quen-xau-anh-huong-den-rang-mieng-o-tre-em-post394252.html#detail_sidebar.pr">
                Những thói quen xấu ảnh hưởng đến răng miệng ở trẻ em
                </a>

                </h1>
                </header>
                </article>

        </section>
        <script>
            // var posts = $('#promotedposts article');
            // if ($(posts).length <= 5) {
            // $('#promotedposts article').show();
            // $('#promotedposts').show();
            // } else {
            // var display = [];
            // while (display.length < 5) {
            // i = Math.floor(Math.random() * $(posts).length);
            // if (display.indexOf(i) == -1) display.push(i);
            // }
            // for (var i = 0, j = display.length; i < j; i++) {
            // $($(posts)[display[i]]).show();
            // };
            // $('#promotedposts').show();
            // }
        </script>

</section>


</div>